<template>
	<view class="content">
		<view class="mask" v-show="maskShow"></view><!-- 遮罩层。。 -->
	 <view class="img">
	 	<image src="@/static/index-top.png" mode="scaleToFill	"></image>
	 </view>
	 <view class="text">
	 	<image src="@/static/index-text.png" mode="scaleToFill"></image>
	 </view>
	 <view class="total">
		 <view class="police" v-if="show">
		 	<view class="top">
		 		报警提醒
		 	</view>
	<view class="item-top">
		<text class="left">报警名称（局部通风机）</text>
	</view>
	<view class="text">
		<view class="polices">
			<text class="tleft">报警类型：</text>
			<text class="tright">类型名称</text>
		</view>
		<view class="polices">
			<text class="tleft">报警等级：</text>
			<text class="tright">二等级</text>
		</view>
		<view class="polices">
			<text class="tleft">报警数据：</text>
			<text class="tright">3.0</text>
		</view>
		<view class="polices">
			<text class="tleft">报警阈值：</text>
			<text class="tright">50.0</text>
		</view>
		<view class="polices">
			<text class="tleft">报警时间：</text>
			<text class="tright">2020-02-02 10：00</text>
		</view>
	</view>
	<view class="button">
		<button type="default" @click="handle">处理</button>
	</view>
		 </view>
	 	<view class="main">
	 		<view class="li" v-for="(item, index) in dataList" :key="item.id" @click="goInfo">
	 		  <view class="all">
	 		  	<view class="left">
	 		  		<image class="imgLeft" :class="{only:index===3}" :src="item.img" mode="scaleToFill"></image>
	 		  	</view>
	 		  	<text class="texts">{{item.text}}</text>
	 		  	<image class="imgRight" :src="item.direction" mode="scaleToFill"></image>
	 		  </view>
			  <view class="line">
			  	
			  </view>
	 		</view>
	 			 	
	 	</view>
	 </view>
	</view>

</template>

<script>
	export default {
		data() {
			return {
				maskShow:true,
				show:true,
				dataList: [
				{
				id: "1",
				img:"../../static/one.png",
				text:"主要通风机",
				direction:"../../static/direction.png"},
				
				{
				id: "2",
				img:"../../static/two.png",
				text:"辅扇通风机",
				direction:"../../static/direction.png"},
				
				{
				id: "3",
				img:"../../static/three.png",
				text:"局部通风机",
				direction:"../../static/direction.png"}
				,
				{id: "4",
				img:"../../static/four.png",
				text:"风窗",
				direction:"../../static/direction.png"},
				
				{id: "5",
				img:"../../static/five.png",
				text:"风门",
				direction:"../../static/direction.png"},
				
				{id: "6",
				img:"../../static/six.png",
				text:"风墙",
				direction:"../../static/direction.png"},
				
				]
			}
		},
		onLoad() {

		},
		methods: {
       goInfo(){
		   uni.navigateTo({
		       url: './info/info'
		   });
	   },
	   handle(){
		   this.maskShow=false
		   this.show=false
	   }
		}
	}

</script>

<style lang="scss" scoped>
	page{
		width: 100%;
		height: 100%;
		background-color: rgb(245, 245, 245);
	}
	
	.content {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		position: relative;
		width: 100%;
		.mask {
				position: fixed;
				left: 0;
				top: 0;
				right: 0;
				bottom: 0;
				z-index: 9;
				background: rgba(0,0,0,0.3);
				-webkit-pointer-events: none;
				-moz-pointer-events: none;
				-ms-pointer-events: none;
				-o-pointer-events: none;
				pointer-events: none;
		
			},
		.img{
			 width: 100%;
			 image{
				 width: 110%;
				height: 276.99rpx;
				margin-left: -5rpx;
				overflow: hidden;
			 }
			 
		}
		.text{
			position: absolute;
			top: 50rpx;
			image{
				width: 297rpx;
				height: 32rpx;
			}
		}
		.total{
			width: 686rpx;
			height: 1002rpx;
			background-color: white;
			position: absolute;
			top: 60%;
			left: 5%;
			border-radius: 3%;
			display: flex;
			flex-direction: column-reverse;
			justify-content: space-around;
			.police{
				width: 570rpx;
				height: 626rpx;
				background-color: white;
				position: absolute;
				z-index: 99;
				margin-left: 7%;
				.top{
					width: 100%;
					height: 90rpx;
					background-color: rgb(243, 247, 251);
					font-size:32rpx;
					font-family:PingFang SC;
					font-weight:600;
					line-height:90rpx;
					text-align: center;
					color:rgba(0,89,183,1);
					opacity:1;
				
				}
				.item-top{
					background-color: white;
				width: 100%;
				height: 90rpx;
				font-size: 32rpx;
				font-family: PingFang SC;
				font-weight: 900;
				color: rgba(51, 51, 51, 1);
				opacity: 1;
				// margin-left: 30rpx;
				line-height: 90rpx;
					border-bottom: 1px dashed rgb(216, 216, 216);
					.left{
						width: 90%;
						margin-left: 30rpx;
					}
				}
				.text {
					width: 100%;
					height: 60%;
					margin-top: 140rpx;
				    margin-left: 20rpx;
					.polices {
						width: 100%;
						height:15%;
				
						// background-color: red;
						.tleft {
							width: 252rpx;
							height: 40rpx;
							font-size: 28rpx;
							font-family: PingFang SC;
							font-weight: 400;
							line-height: 46rpx;
							color: rgb(153, 153, 153);
							opacity: 1;
							margin-left: 10rpx;
						}
				
						.tright {
							width: 252rpx;
							height: 40rpx;
							font-size: 28rpx;
							font-family: PingFang SC;
							font-weight: 400;
							line-height: 46rpx;
							color: rgb(51, 51, 51);
							opacity: 1;
						}
						
					}
				}
				.button {
					button {
						width: 80%;
						height: 72rpx;
						background-color: rgb(0, 89, 183);
						line-height: 72rpx;
						font-size: 28rpx;
						font-family: PingFang SC;
						font-weight: 400;
						color: rgba(255, 255, 255, 1);
						opacity: 1;
						position: absolute;
						right: 55rpx;
						bottom: 32rpx;
					}
				}
			}
			.main{
				width: 90%;
				margin: 0 auto;
				.li{
					width: 100%;
					height: 167rpx;
					.line{
						width:100%;
						height:1px;
						background:rgba(238,238,238,1);
						opacity:1;
					}
					.all{
						line-height: 167rpx;
						position: relative;
					}
					.only{
						width: 180rpx;
						height: 120rpx;
						background-color: pink;
						border-radius: 10%;
					}
					.imgLeft{
						width: 88rpx;
						height: 88rpx;
						position: absolute;
						top: 40rpx;
					}
					.imgLeft :nth-child(3){
						background-color: pink;
						width: 100rpx;
						height: 100rpx;
	
					}
					.texts{
						color: #333333;
						width:56rpx;
						height: 88rpx;
						font-size:30rpx;
						font-family:PingFang SC;
						font-weight:bolder;
						color:rgba(51,51,51,1);
						opacity:1;
						line-height: 88rpx;
						margin-left: 160rpx;
				        
					}
					.imgRight{
						width: 88rpx;
						height: 88rpx;
						position: absolute;
						right: -10rpx;
						top: 40rpx;
						
					}
				}
			}
		
		}
	}
  
</style>
